#include<iostream>
using namespace std;
#include "classes 2.h"


videogame::videogame(int x, string y, char z)	
{
	yearOfRelease=x;
	Genre=y;
	Restriction=z;
}


void videogame::setYearOfRelease(int year)
{
	if(year>2012 || year<1970)
	{
		ExceptionClass year_exception("year entered is out of range");
		throw year_exception
	}
	yearOfRelease = year;

}
void videogame::setRestriction(char restriction)
{
	Restriction = restriction;
}
void videogame::setGenre(string genre)
{
	Genre = genre;
}

int videogame::getYearOfRelease()
{
	return yearOfRelease;
}

char videogame::getRestriction()
{
	return Restriction;
}

string videogame::getGenre()
{
	return Genre;
}

void main()
{
	int y;
	char r;
	string g;
	cout << "enter genre " << endl;
	cin >> g;
	cout << "enter retstriction " << endl;
	cin >> r;
	cout << "enter year of release " << endl;
	cin >> y;
	videogame minecraft(y,g,r);
	//videogame ACIII(2011, "TPA", 'M');
	//cout << Minecraft.getGenre() << endl;
	cout<<"year= " << minecraft.getYearOfRelease()<<endl;
	cout<<"restriction= "<<minecraft.getRestriction()<<endl;
	cout<<"genre= " << minecraft.getGenre()<<endl;
	//cout<<ACIII.getYearOfRelease()<< endl;
	//cout<< ACIII.getRestriction()<<endl;



	system("pause");
}
